settings object

This method will read the data contained in a numeric value.

double read_number(string value_name)

Parameters:
value_name
The name of the value to read.

Return value:
The value on success, or 0 on failure.

Remarks:
If an error occurs, the method will return 0 and the last_error flag will be set.

Example:
// Read the music volume from the registry.

void main()
{
settings game_data;
bool success=game_data.setup("Testtime Interactive", "Bonebreaker", false);
if(!success)
{
alert("Error", "Could not access the registry.");
exit();
}
if(!game_data.exists("music_volume"))
{
alert("Error", "Could not read music_volume. The specified value does not exist.");
exit();
}
double vol=game_data.read_number("music_volume");
if(last_error<0)
{
alert("Error", "Could not access music_volume.");
exit();
}
alert("Music Volume", vol);
}